//
//  CustomBtn.m
//  MixRN
//
//  Created by zsgjs on 2017/2/28.
//  Copyright © 2017年 zsgjs. All rights reserved.
//

#import "CustomBtn.h"

@implementation CustomBtn

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addTarget:self action:@selector(cutomBtnClick) forControlEvents:UIControlEventTouchUpInside];
        self.userInteractionEnabled = true;
        self.enabled = true;
        
    }
    return self;
}

- (void)cutomBtnClick
{
    self.onButtonClicked(@{@"key1": @"nian", @"key2": @"moohoo"});
    NSLog(@"---%@---", self.outPutStr);
    
}

#pragma mark - setter
- (void)setBtnTil:(NSString *)btnTil
{
    [self setTitle:btnTil forState:UIControlStateNormal];
}

- (void)setBgColor:(UIColor *)bgColor
{
    [self setBackgroundColor:bgColor];
}

- (void)setTilColor:(UIColor *)tilColor
{
    [self setTitleColor:tilColor forState:UIControlStateNormal];
}


@end
